<!DOCTYPE html>
<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
    <style>
        .layui-btn+.layui-btn{
            margin-left: 0;
        }
        .layui-table td, .layui-table th
        {
            min-width: 50px !important;
        }
    </style>
  </head>
  
  <body>
    <div class="x-body x-admin">
        
      <xblock>
        <div class="layui-card-body" style="padding-left: 0;float:left;padding-left:20px;padding-top:0;">
          <form class="layui-form layui-col-space5" action="" method="get">
            <div class="layui-inline">
              <label>日期选择</label>
              <div class="layui-input-inline">
                <input type="text" name="start_date" id="start_date" value="{if condition="input('start_date')"}{:input('start_date')}{/if}" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-inline">
              <label>至</label>
              <div class="layui-input-inline">
                <input type="text" name="end_date" id="end_date" value="{if condition="input('end_date')"}{:input('end_date')}{/if}" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-show-xs-block">
              <select name="goods_id" id="goods_id" lay-search>
                <option value="">全部礼品</option>
                {volist name="goods" id="value"}
                <option value="{$value.id}" {$value.id==input('goods_id')?'selected':''}>{$value.goods_name}</option>
                {/volist}
              </select>
            </div>
            {if condition="session('group_id','','admin') != 5 && session('group_id','','admin') != 2"}
            <div class="layui-inline layui-show-xs-block">
              <select name="admin_id" id="admin_id" lay-search>
                <option value="">全部业务员</option>
                {volist name="adminList" id="value"}
                <option value="{$value.id}" {$value.id==input('admin_id')?'selected':''}>{$value.name}</option>
                {/volist}
              </select>
            </div>
            {/if}

            <div class="layui-input-inline">
                <button class="layui-btn" id="search-btn"><i class="layui-icon"></i></button>
            </div>
          </form>
        </div>
      </xblock>
      <div class="layui-table-body layui-table-main" style="width: 100%;">
      <table class="layui-table layui-form" id="test">
          <thead>
              <tr>
                  <th>商品名</th>
                  <th>品牌</th>
                  <th>出库数</th>
                  <th>底价单价</th>
                  <th>出库成本</th>
              </tr>
          </thead>
          <tbody>
            {volist name="goods" id="value"}
            <tr>
              <td>{$value.goods_name}</td>
              <td>{$value.brand}</td>
              <td>{$value.count}</td>
              <td>{$value.real_price}</td>
              <td>{$value.real_price * $value.count}</td>
            </tr>
            {/volist}
          </tbody>
      </table>
    </div>
    </div>

<script>
layui.use(['form', 'layedit', 'laydate','table','jquery'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,laydate = layui.laydate
  ,table = layui.table
  ,$ = layui.jquery;

  laydate.render({
    elem: '#start_date'
  });
  laydate.render({
    elem: '#end_date'
  });
});

</script>
</body>

</html>